<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
	<f:facet name="first">
		<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
	</f:facet>
</h:head>
<body>
	<ui:composition template="/faces/template.xhtml">
		<ui:define name="content">
			<h:form id="form">
				<p:growl id="growl" showDetail="true" />
				<p:outputLabel value="Tableau de bord: NOUNOU"></p:outputLabel>
				<p:tabView id="tabView">
					<p:tab id="tabDashboard" title="Tableau de bord">
						<p:panelGrid header="Enfants" columns="3" style="width:100%;">
							<p:panel header="enfant1">kk</p:panel>
							<p:panel header="enfant2">kk</p:panel>
							<p:panel header="enfant3">kk</p:panel>
							<p:panel header="enfant4">kk</p:panel>
						</p:panelGrid>
					</p:tab>
					<p:tab id="tabContrat" title="Contrats">
						<p:panel>
							<p:panelGrid columns="2" style="height:100%; width:100%;">
								<p:row>
									<p:column style="width:20%">
										<p:menu>
											<p:submenu label="Ajax Menuitems">
												<p:menuitem value="Save" actionListener="#{menuBean.save}"
													icon="ui-icon-disk" />
												<p:menuitem value="Update"
													actionListener="#{menuBean.update}"
													icon="ui-icon-arrowrefresh-1-w" />
											</p:submenu>
										</p:menu>
									</p:column>
									<p:column style="width:80%">
										<p:panel>
											<p:editor></p:editor>
										</p:panel>
									</p:column>
								</p:row>
							</p:panelGrid>

						</p:panel>
					</p:tab>
				</p:tabView>
				<p:panel>
					<p:growl id="growlContrat" showDetail="true"></p:growl>
					<p:wizard flowListener="#{ContratController.onFlowProcess}"
						nextLabel="Suivant" backLabel="Précédent">
						<p:tab id="enfant" title="Enfant">
							<p:panel header="Détails de l'enfant">
								<h:messages errorClass="error" />
								<h:panelGrid columns="2" columnClasses="label, value"
									styleClass="grid">
									<h:outputText value="Nom: *" />
									<p:inputText required="true" label="nom"
										value="#{ContratController.enfant.nom}" />

									<h:outputText value="Prénom: *" />
									<p:inputText required="true" label="prenom"
										value="#{ContratController.enfant.prenom}" />

									<h:outputText value="Date de naissance: *" />
									<p:calendar required="true" locale="fr" showButtonPanel="true"
										navigator="true" label="Date de naissance"
										maxdate="#{ContratController.maxDate}"
										value="#{ContratController.enfant.dateNaissance}" />

								</h:panelGrid>
							</p:panel>
						</p:tab>
						<p:tab id="parent1" title="Parent 1">
							<p:panel header="Détails parent 1">
								<h:messages errorClass="error" />


								<p:panel toggleable="true" header="Parent Existant"
									visible="true">
									<h:form>
										<p:dataTable id="par1" value="#{ContratController.parents}"
											var="p" selection="#{ContratController.selectedParent1}">
											<p:column selectionMode="single" style="width:2%" />
											<p:column headerText="Nom">#{p.nom}</p:column>
											<p:column headerText="Prénom">#{p.prenom}</p:column>
										</p:dataTable>
									</h:form>
								</p:panel>
							</p:panel>
						</p:tab>
						<p:tab id="infos" title="Informations">
							<p:panel header="Détails du contrat">
								<h:messages errorClass="error" />

								<h:panelGrid columns="2" columnClasses="label, value"
									styleClass="grid">

									<h:outputText value="Type de contrat: *" />
									<p:selectOneListbox style="width:100%" label="type"
										value="#{ContratController.typeContrat}">
										<f:selectItem itemLabel="Contrat Bébé" itemValue="1" />
										<f:selectItem itemLabel="Contrat Périscolaire" itemValue="2" />
									</p:selectOneListbox>
									<h:outputText value="Tarif horaire: *" />
									<p:inputText required="true" label="tarif"
										value="#{ContratController.tarif}" />
								</h:panelGrid>
								<p:commandButton value="Sauvegarder" update="growlContrat"
									actionListener="#{ContratController.save}" />
							</p:panel>
						</p:tab>
					</p:wizard>
				</p:panel>
			</h:form>

			<p:dock>
				<p:menuitem value="Accueil"
					icon="/images/Crystal_Clear_action_bookmark.png" url="#" />
				<p:menuitem value="Documents"
					icon="/images/Crystal_Clear_app_kdvi.png" url="#" />
				<p:menuitem value="Planning"
					icon="/images/Crystal_Clear_mimetype_schedule.png" url="#" />
				<p:menuitem value="Activités"
					icon="/images/Crystal_Clear_mimetype_krita_kra.png" url="#" />
				<p:menuitem value="Contacts" icon="/images/Crystal_Clear_kuser2.png"
					url="#" />
			</p:dock>
		</ui:define>
	</ui:composition>
</body>
</html>